import request from '@/utils/request'

// 查询用户订单详情列表
export function listOrderdetail(query) {
  return request({
    url: '/scp/orderdetail/list',
    method: 'get',
    params: query
  })
}

// 查询用户订单详情详细
// export function getOrderdetail(orderDetailId) {
//   return request({
//     url: '/orderDetail/orderdetail/' + orderDetailId,
//     method: 'get'
//   })
// }

//根据订单id查询订单详情
export function getOrderdetail(orderId) {
  return request({
    url: '/scp/orderdetail/' + orderId,
    method: 'get'
  })
}

// 新增用户订单详情
export function addOrderdetail(data) {
  return request({
    url: '/scp/orderdetail',
    method: 'post',
    data: data
  })
}

// 修改用户订单详情
export function updateOrderdetail(data) {
  return request({
    url: '/scp/orderdetail',
    method: 'put',
    data: data
  })
}

// 删除用户订单详情
export function delOrderdetail(orderDetailId) {
  return request({
    url: '/scp/orderdetail/' + orderDetailId,
    method: 'delete'
  })
}
